<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="Adobe RoboHelp - www.adobe.com">
<title>About creating metrics in documents</title>
<link rel="stylesheet" href="userhelp_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{   document.write("<link rel='stylesheet' href='userhelp.css'>");}
//-->
</script>
<style type="text/css">
<!--
table.whs1 { x-cell-content-align:top; left:0px; top:349px; border-spacing:0px; }
tr.whs2 { x-cell-content-align:top; }
td.whs3 { border-left-width:1px; border-left-color:#000000; border-left-style:Solid; border-top-style:Solid; border-top-color:#000000; border-top-width:1px; border-right-width:1px; border-right-color:#000000; border-right-style:Solid; border-bottom-style:Solid; border-bottom-color:#000000; border-bottom-width:1px; padding-right:10px; padding-left:10px; }
p.whs4 { font-weight:bold; }
td.whs5 { border-top-style:Solid; border-top-color:#000000; border-top-width:1px; border-right-width:1px; border-right-color:#000000; border-right-style:Solid; border-bottom-style:Solid; border-bottom-color:#000000; border-bottom-width:1px; padding-right:10px; padding-left:10px; }
td.whs6 { border-left-width:1px; border-left-color:#000000; border-left-style:Solid; border-right-width:1px; border-right-color:#000000; border-right-style:Solid; border-bottom-style:Solid; border-bottom-color:#000000; border-bottom-width:1px; padding-right:10px; padding-left:10px; }
td.whs7 { border-right-width:1px; border-right-color:#000000; border-right-style:Solid; border-bottom-style:Solid; border-bottom-color:#000000; border-bottom-width:1px; padding-right:10px; padding-left:10px; }
ul.whs8 { list-style:disc; }
-->
</style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
<!--
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//-->
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
-->
</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="whlang.js"></script>
<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
</head>
<body><script type="text/javascript" language="javascript1.2">
<!--
if (window.gbWhTopic)
{
	if (window.addTocInfo)
	{
	addTocInfo("Creating and modifying documents and dashboards\nCreating and formatting a document\nWorking with metrics and totals in documents\nCreating metrics in documents\nAbout creating metrics in documents");
addButton("show",BTN_TEXT,"Show","","","","",0,0,"","","");

	}
	if (window.writeBtnStyle)
		writeBtnStyle();

	if (window.writeIntopicBar)
		writeIntopicBar(1);

	if(1)
	{
	
	}

	if (window.setRelStartPage)
	{
	setRelStartPage("MicroStrategy_Web_Help.htm");

		autoSync(1);
		sendSyncInfo();
		sendAveInfoOut();
	}
}
else
	if (window.gbIE4)
		document.location.reload();

//-->
</script>
<h1>About creating metrics in documents</h1>
<p>Metrics that an analyst can define in a document include calculated 
 expressions, derived metrics, and summary metrics. They are created in 
 the document, not in the dataset report. However, like other metrics, 
 they are calculated at the level of the dataset. They all provide different 
 benefits and are used in different cases. Use the table below to determine 
 which type of metric you should create based on your goal:</p>
<table x-use-null-cells cellspacing="0" class="whs1">
<script language='JavaScript'><!--
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) document.write("</table><table x-use-null-cells cellspacing='0' border='1' bordercolor='black' bordercolorlight='black' bordercolordark='black'>");
//--></script>
<col>
<col>
<col>


<tr valign="top" class="whs2">
<td class="whs3">
<p class="whs4">Goal</td>
<td class="whs5">
<p class="whs4">Derived Metric</td>
<td class="whs5">
<p class="whs4">Calculated Expression</td></tr>

<tr valign="top" class="whs2">
<td class="whs6">
<p>Use metrics from multiple datasets</td>
<td class="whs7">
<p>No</td>
<td class="whs7">
<p>Yes</td></tr>

<tr valign="top" class="whs2">
<td class="whs6">
<p>Use advanced functions</td>
<td class="whs7">
<p>Yes</td>
<td class="whs7">
<p>No</td></tr>

<tr valign="top" class="whs2">
<td class="whs6">
<p>Place in a grid</td>
<td class="whs7">
<p>Yes</td>
<td class="whs7">
<p>No</td></tr>

<tr valign="top" class="whs2">
<td class="whs6">
<p>Place in a text field</td>
<td class="whs7">
<p>Yes</td>
<td class="whs7">
<p>Yes</td></tr>

<tr valign="top" class="whs2">
<td class="whs6">
<p>Use in conditional formatting</td>
<td class="whs7">
<p>Yes</td>
<td class="whs7">
<p>No</td></tr>

<tr valign="top" class="whs2">
<td class="whs6">
<p>Reuse within the document</td>
<td class="whs7">
<p>Yes</td>
<td class="whs7">
<p>No</td></tr>

<tr valign="top" class="whs2">
<td class="whs6">
<p>Create on the fly in a text field, without creating a new object and 
 adding it to the layout. </td>
<td class="whs7">
<p>No</td>
<td class="whs7">
<p>Yes</td></tr>
<script language='JavaScript'><!--
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) document.write("</table></table><table>");
//--></script>
</table>
<h2>Metrics in the Detail section</h2>
<p>A metric in a text field in the Detail section is displayed as it is 
 calculated in the dataset report. To change the calculation of a metric, 
 place it in a grid or in a text field in a different section. For example, 
 placing a metric in the Document Footer provides a grand total. </p>
<p>Metrics that an analyst can define in a document include calculated 
 expressions, derived metrics, and summary metrics. They are created in 
 the document, not in the dataset report. However, like other metrics, 
 they are calculated at the level of the dataset.</p>
<h2>Metrics in grouping sections</h2>
<p>When you place a metric in a text field in a group header or footer, 
 the metric is totaled at the level of the group. Grouping allows you to 
 specify the attribute, consolidation, or custom group to use to calculate 
 the metric. Like other metrics, a derived metric is calculated at the 
 level of the group.</p>
<p>The calculation of the group total is determined by the metric's definition, 
 specifically by the dynamic aggregation function. See 
<a href="#Dynamic_aggregation_in_documents">Dynamic 
 aggregation in documents</a> below.</p>
<p>Summary metrics explicitly set the aggregation function; this is their 
 primary role. For other user-defined metrics, the function specified in 
 the definition is also used as the aggregation function, if the function 
 is SUM, MIN, or MAX.</p>
<h2>Metrics in document/page sections</h2>
<p>When you place a metric in a text field in the Document Header/Footer 
 or the Page Header/Footer, the metric is totaled across the entire dataset. 
 Like grouping sections, the calculation of these pages and grand totals 
 are determined by the metric's dynamic aggregation function. In the case 
 of user-defined metrics, the function specified in their definition is 
 used as the aggregation function if the function is SUM, MIN, or MAX. 
 See 
<a href="#Dynamic_aggregation_in_documents">Dynamic aggregation in 
 documents</a> below.</p>
<h2>Metrics in a Grid/Graph in grouping sections</h2>
<p>When you place a metric in a Grid/Graph control that is in a group header 
 or footer, the metric is calculated at the level defined by the attributes, 
 consolidations, or custom groups on the Grid/Graph. Additionally, the 
 level of the grouping section is taken into account, but only for those 
 group fields that exist on the dataset to which the Grid/Graph belongs.</p>
<p>If the Grid/Graph does not contain any objects other than the metric, 
 the metric behaves as though it were in a text field in the same section. 
 As with metrics in text fields in grouping sections, the calculation is 
 determined by the metric's dynamic aggregation function. In the case of 
 user-defined metrics, the function specified in their definition is used 
 as the aggregation function if the function is SUM, MIN, or MAX. See 
<a 
 href="#Dynamic_aggregation_in_documents">Dynamic aggregation in documents</a> 
 below.</p>
<h2>Metrics in a Grid/Graph in document/page sections</h2>
<p>When you place a metric in a Grid/Graph control that is in the Document 
 Header/Footer or the Page Header/Footer, the metric is calculated at the 
 level defined by the attributes, consolidations, or custom groups on the 
 Grid/Graph. If the Grid/Graph does not contain any objects other than 
 the metric, the metric behaves as though it were in a text field in the 
 same section. As with metrics in text fields in grouping sections, the 
 calculation is determined by the metric's dynamic aggregation function. 
 In the case of user-defined metrics, the function specified in their definition 
 is used as the aggregation function if the function is SUM, MIN, or MAX. 
 See 
<a href="#Dynamic_aggregation_in_documents">Dynamic aggregation in 
 documents</a> below.</p>
<h2>
<a name=Dynamic_aggregation_in_documents></a>Dynamic aggregation in 
 documents</h2>
<p>Dynamic aggregation occurs in documents when you place a text field 
 or a Grid/Graph control containing a metric in a section header or footer, 
 that is anywhere except in the Detail section. The function used in this 
 aggregation is set in the metric definition. </p>
<ul type="disc" class="whs8">
	
<li class=p><p>If the metric is SUM, MIN, or MAX and the dynamic aggregation 
 function is default, the document will aggregate the metric correctly 
 using SUM, MIN, or MAX accordingly. If you do not want SUM, MIN, or MAX 
 to be used as the dynamic aggregation, change the metric definition by 
 specifying the new function to be used as the dynamic aggregation function.</p></li>
	
<li class=p><p>If a metric function other than SUM, MIN, or MAX is 
 used and the dynamic aggregation function is set to default, dynamic aggregation 
 does not occur. Instead of a value, you will instead see dashes, unless 
 you have changed the replacement text. If you want to use a particular 
 function, change the metric definition by specifying the function to use 
 as the dynamic aggregation function.</p></li>
</ul>
<p>Compound metrics follow the same rules for aggregation. If a compound 
 metric does not use a SUM, MIN, or MAX function, and the dynamic aggregation 
 function is set to default, a null value is generated when the compound 
 metric is placed in a section header or footer (that is, anywhere other 
 than the Detail section.) To trigger dynamic aggregation, specify the 
 function to use for calculation.</p>
<p>In the case of user-defined metrics, the function specified in their 
 definition is used as the aggregation function if the function is SUM, 
 MIN, or MAX.</p>
<p class="whs4">&nbsp;</p>
<p class="whs4">Related topics</p>
<ul type="disc" class="whs8">
	
<li class=p><p>
<a HREF="Creating_derived_metrics_documents.htm">Creating 
 derived metrics in documents</a></p></li>
	
<li class=p><p>
<a HREF="Totals_and_summary_metrics.htm">Calculating 
 totals and summary metrics in documents</a></p></li>
</ul>
<script type="text/javascript" language="javascript1.2">
<!--
highlightSearch();
if (window.writeIntopicBar)
	writeIntopicBar(0);
if(0)
{

}
//-->
</script>
</body>
</html>
